<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
    String path= request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <link href="<%=basePath%>css/style.css" rel="stylesheet" type="text/css" />
    <script type="<%=basePath%>text/javascript" src="js/jquery.js"></script>

    <script type="text/javascript">
        $(document).ready(function(){
            $(".click").click(function(){
                $(".tip").fadeIn(200);
            });

            $(".tiptop a").click(function(){
                $(".tip").fadeOut(200);
            });

            $(".sure").click(function(){
                $(".tip").fadeOut(100);
            });

            $(".cancel").click(function(){
                $(".tip").fadeOut(100);
            });

        });
        function deleteStudent(isbn){
            if(confirm('确认要删除选择的数据吗？')){
                location.href="<%=basePath%>book/deleteBook.do?isbn="+isbn;
            }
        }
    </script>
</head>


<body>

<div class="place">
    <span>位置：</span>
    <ul class="placeul">
        <li><a href="#">基本信息管理</a></li>
        <li><a href="#">图书列表</a></li>
    </ul>
</div>

<div class="rightinfo">

    <table class="tablelist">
        <thead>
        <tr>
            <th>图书编号<i class="sort"><img src="<%=basePath%>images/px.gif" /></i></th>
            <th>书名</th>
            <th>作者</th>
            <th>出版社</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${sList}" var="demo">
            <tr>
                <td>${demo.id}</td>
                <td>${demo.username}</td>
                <td>${demo.password}</td>
                <td><img src=${demo.filename}></td>
            </tr>
        </c:forEach>
        </tbody>
    </table>


    <div class="pagin">
        <ul class="paginList">
            <li class="paginItem"><a href="<%=basePath%>book/updatePageInfo.do?page=1&totlePages=${totlePages}">首页</a></li>
            <li class="paginItem"><a href="<%=basePath%>book/updatePageInfo.do?page=${page<=1?page:(page-1)}&totlePages=${totlePages}"><span class="pagepre"></span></a></li>
            <li class="paginItem"><a href="<%=basePath%>book/updatePageInfo.do?page=${page>=totlePages?(totlePages+1):(page+1)}&totlePages=${totlePages}"><span class="pagenxt"></span></a></li>
            <li class="paginItem"><a href="<%=basePath%>book/updatePageInfo.do?page=${totlePages+1}&totlePages=${totlePages}">末页</a></li>
        </ul>
    </div>

</div>

<script type="text/javascript">
    $('.tablelist tbody tr:odd').addClass('odd');
</script>
</body>
</html>